import { _decorator, Component, Node, Label, tween, view, UITransform, Vec3, SpriteAtlas, SpriteFrame, Sprite, UIOpacity, EventTouch } from 'cc';
import { App } from '../App';
import { LoadMg } from '../tools/LoadMg';
import UtilTool from '../tools/UtilTool';
const { ccclass, property } = _decorator;

// 选择链id  （注：这里的脚本和预制件暂时废弃）
@ccclass('SetChainPanel')
export class SetChainPanel extends Component {
    @property(Node)
    contentNode: Node = null;

   private cb = null
    onLoad() {
        UtilTool.setScreen(this.node)
        UtilTool.nodeActive(this.contentNode,5,0.16)
    }

    start() {
        
    }

    /** 
     * 设置回调
      */
    public setCallBack(cb) {
        this.cb = cb
    }

    /** 
     * 选择链ID1
      */
    clickChainOne() {
        this.cb && this.cb(0)
        this.node.destroy()
    }

    /** 
     * 选择链ID2
      */
    clickChainTwo() {
        this.cb && this.cb(1)
        this.node.destroy()
    }
}

